package com.ilop.siteraudio.activity;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.widget.ImageView;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.ilop.siteraudio.R;
import com.ilop.siteraudio.util.StatusBarUtil;
import com.ilop.siteraudio.view.banner.BannerLayout;
import com.ilop.siteraudio.view.banner.layoutmanager.WebBannerAdapter;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * @author skygge
 * @date 2/26/21.
 * GitHub：javofxu@github.com
 * email：skygge@yeah.net
 * description：
 */
public class InstructionActivity extends AppCompatActivity {

    @SuppressLint("NonConstantResourceId")
    @BindView(R.id.iv_instructions_back)
    ImageView mBack;
    @SuppressLint("NonConstantResourceId")
    @BindView(R.id.layout_banner_recycler)
    BannerLayout mInstructionGif;

    @SuppressLint("SetJavaScriptEnabled")
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_instruction);
        StatusBarUtil.setDefaultStatus(this);
        ButterKnife.bind(this);
        mBack.setOnClickListener(view -> finish());
        initBanner();
    }

    private void initBanner() {
        WebBannerAdapter webBannerAdapter=new WebBannerAdapter(this);
        mInstructionGif.setAdapter(webBannerAdapter);
    }
}
